package com.basic.system.dao.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@Data
public class SysManagement {
    @NotNull(groups = {Update.class, Delete.class}, message = "制度Id不能为空")
    private Long id;

    @NotBlank(groups = {Insert.class}, message = "制度名称不能为空")
    private String standardName;

    private String uploader;

    @NotBlank(groups = {Insert.class}, message = "上传人Id不能为空")
    private String boId;

    @NotBlank(groups = {Insert.class}, message = "关联系统文件Id不能为空")
    private String url;

    private Short sort;

    private String status;

    @NotNull(groups = {Insert.class}, message = "部门Id不能为空")
    private Long deptId;

    private String deptName;

    private Short isEnabled;

    private Short systemId;

    private String createBy;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date createTime;

    @NotBlank(groups = {Update.class}, message = "修改人名称不能为空")
    private String updateBy;

    @NotNull(groups = {Update.class}, message = "修改人Id不能为空")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date updateTime;

    public interface Select{}

    // 新增使用(配合spring的@Validated功能分组使用)
    public interface Insert{}

    // 更新使用(配合spring的@Validated功能分组使用)
    public interface Update{}

    // 删除使用(配合spring的@Validated功能分组使用)
    public interface Delete{}

}